package net.zjitc.mapper;

import net.zjitc.pojo.Admin;
import net.zjitc.pojo.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface CategoryMapper {
    @Insert("insert into vueshop_category values(null,#{name},#{picture},#{pid})")
    public void addCategory(Category category);
    @Select("select * from vueshop_category")
    public List<Category> findCategoryList();
    @Delete("delete from vueshop_category where id=#{id}")
    public void deleteCategory(int id);
    @Update("update vueshop_category set name=#{name},picture=#{picture},pid=#{pid} where id=#{id}")
    public void updateCategory(Category category);
}
